#ifndef MINIROBOT_H
#define MINIROBOT_H

#include <QMainWindow>
#include "attitudeindicator/attitudeindicator.h"
#include "FFmpeg/QGLPlayerWidget.h"

// minirobot.h
QT_BEGIN_NAMESPACE
namespace Ui
{
class MiniRobot;
}
QT_END_NAMESPACE

class MiniRobot : public QMainWindow
{
    Q_OBJECT

  public:
    MiniRobot(QMainWindow *parent = nullptr);
    ~MiniRobot();

  private:
    Ui::MiniRobot *ui;
    AttitudeIndicator *attitude_indicator;  // 姿态指示器
    QGLPlayerWidget *qglplay_ptz;           // 视频播放器

    void setup_connect();
    void init_camera();          // 初始化摄像头
    void start_camera_stream();  // 启动视频流

  private slots:
    void on_camera_play_succeed();  // 摄像头播放成功
    void on_camera_play_fail();     // 摄像头播放失败
};
#endif  // MINIROBOT_H
